package greate.project.event1;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class UserService1 extends BaseEventPublisher { // <1>

    public void register(String username) {
        // ... 执行注册逻辑
        log.info("[register][执行用户({}) 的注册逻辑]", username);
        // <2> ... 发布
        publishEvent(new UserRegisterEvent1(username));
        log.info("【register】【注册完成 ： {}】" , username);
    }
}